package com.liang.pcc.common.errorcode;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum UserErrorCode implements IErrorCode {

    ACCOUNT_NOT_EXIST("B000200", "账号不存在，请先注册!"),
    ACCOUNT_EXIST("B000201", "账号已存在"),
    USER_EXIST("B000202", "用户记录已存在"),
    USER_NOT_EXIST("B000203", "用户不存在"),
    USER_SAVE_ERROR("B000204", "用户记录新增失败"),
    USER_NOT_LOGIN("B000205", "用户未登录"),
    USER_HAS_LOGIN("B000206", "用户已登录"),
    USER_LOGIN_ERROR("B000207", "账号或密码错误"),
    PASSWORD_ERROR("B000208", "密码错误,请确认密码是否正确!"),
    ORIGIN_PASSWORD_ERROR("B000209", "原密码不正确!"),
    PASSWORD_SAME_ERROR("B000210", "新密码必须与旧密码不一致!");

    private final String code;
    private final String message;

    @Override
    public String code() {
        return this.code;
    }

    @Override
    public String message() {
        return this.message;
    }
}